﻿using System.ComponentModel;
namespace WPFExcelReport
{
    public partial class K14LG : SDBASE
    {

        public K14LG()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VSDDAT();
            DataContext = MV;
            SDSA = "14LG";
            InitializeComponent();
        }
        public override void Window_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            if (IsLoaded)
                return;
            base.Window_Loaded(sender, e);
            Load();
        }
        public void Load()
        {

            if (SDSA.Trim().Length == 0)
                return;
            dwData = TBMain.NewRow();
            dwData["SDSA"] = "0014";
            dwData["SDKEY"] = " AND SDKEY ='XXXXXX'";
            SResult = ((VSDDAT)MV).QuerySDDAT(dwData, 14);
            MergeData(SResult, false);

            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "14LG";
            dwData["KEY"] = "0";
            dwData["DES"] = "None";// Helpers.Helper.ConvertGB2312To8859P1("浅");
            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "14LG";
            dwData["KEY"] = "1";
            dwData["DES"] = "Error";// Helpers.Helper.ConvertGB2312To8859P1("中"); ;
            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "14LG";
            dwData["KEY"] = "2";
            dwData["DES"] = "Info";// Helpers.Helper.ConvertGB2312To8859P1("深"); ;
            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "14LG";
            dwData["KEY"] = "3";
            dwData["DES"] = "Verbose";// Helpers.Helper.ConvertGB2312To8859P1("原");
            dwData = TBMain.Rows.Add();
            dwData["SDSA"] = "14LG";
            dwData["KEY"] = "4";
            dwData["DES"] = "Help";// Helpers.Helper.ConvertGB2312To8859P1("原");
        }
    }
}
